package com.ruibang.glass.sale.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruibang.glass.sale.dto.FileInfoDTO;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;


@Data
@TableName(value = "g_sale_order_management")
@ApiModel(description = "销售订单")
public class GSaleOrderManagement extends BaseEntity implements Serializable {

    @ApiModelProperty(value = "Id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "订单编号")
    private String orderNumber;

    @ApiModelProperty(value = "合同名称")
    private String contractName;

    @ApiModelProperty(value = "订货结算客户")
    private String consignorSettlementCustomer;

    @ApiModelProperty(value = "需方客户")
    private String consigneeCustomer;

    @ApiModelProperty(value = "产品类别")
    private String productCategory;

    @ApiModelProperty(value = "发货日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deliveryDate;

    @ApiModelProperty(value = "发货进度")
    private String deliveryProgress;

    @ApiModelProperty(value = "提醒时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime reminderTime;

    @ApiModelProperty(value = "总数")
    private BigDecimal totalQuantity;

    @ApiModelProperty(value = "已发货")
    private BigDecimal delivered;

    @ApiModelProperty(value = "待发货")
    private BigDecimal pendingDelivery;

    @ApiModelProperty(value = "换货数")
    private BigDecimal exchangeQuantity;

    @ApiModelProperty(value = "退货数")
    private BigDecimal returnQuantity;

    @ApiModelProperty(value = "下单日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime orderTime;

    @ApiModelProperty(value = "赠送客户Id")
    private String customerId;

    @ApiModelProperty(value = "赠送客户名称")
    private String customerName;

    @ApiModelProperty(value = "合同编号")
    private String contractNumber;

    @ApiModelProperty(value = "合同Id")
    private String contractId;

    @ApiModelProperty(value = "客户订单编号")
    private String customerOrder;

    @ApiModelProperty(value = "客户订单编号")
    private String statusType;

    @ApiModelProperty(value = "订单类型")
    private String orderType;

    @ApiModelProperty(value = "销售员Id")
    private String salesId;

    @ApiModelProperty(value = "销售员名称")
    private String salesName;

    @ApiModelProperty(value = "币种")
    private String currency;

    @ApiModelProperty(value = "税率")
    private String taxRate;

    @ApiModelProperty(value = "付款周期")
    private String paymentTerm;

    @ApiModelProperty(value = "付款方式")
    private String paymentMethod;

    @ApiModelProperty(value = "是否返利")
    private String isRebate;

    @ApiModelProperty(value = "定金比例")
    private String depositRatio;

    @ApiModelProperty(value = "内外销标志")
    private String salesType;

    @ApiModelProperty(value = "产线")
    private String productionLine;

    @ApiModelProperty(value = "关联多发订单货")
    private String relatedMultipleOrders;

    @ApiModelProperty(value = "关联多发订单货")
    @TableField(exist = false)
    private String relatedMultipleOrdersNumber;

    @ApiModelProperty(value = "创建人Id")
    private String createUserId;

    @ApiModelProperty(value = "是否被关联")
    private String collectionStatus;

    @TableField(exist = false)
    private List<GSaleOrderProduct> saleOrderProductList;

    @TableField(exist = false)
    private List<String> fileList;

    @TableField(exist = false)
    private List<String> removeFileList;

    @TableField(exist = false)
    List<FileInfoDTO> fileInfoDTOList;

    @TableField(exist = false)
    private List<String> ids;


    @ApiModelProperty(value = "状态")
    @TableField(exist = false)
    private String status;

    @ApiModelProperty(value = "流程Id")
    @TableField(exist = false)
    private String processId;

    @ApiModelProperty(value = "审批状态")
    private String approveStatus;

    @ApiModelProperty(value = "审批节点")
    @TableField(exist = false)
    private String nodeName;

    @ApiModelProperty(value = "当前审批人Id")
    @TableField(exist = false)
    private String approveUserId;

    @ApiModelProperty(value = "审批人")
    @TableField(exist = false)
    private String approveUser;

    @ApiModelProperty(value = "菜单Id")
    @TableField(exist = false)
    private String menuId;


}
